<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>Add Product</title>
    </head>
    <body>
        <h1>New Product</h1>
        <form action="/webshop/admin/products/add" method="POST">
            <table>
                <tr>
                    <td>Designation</td>
                    <td><input type="text" name="designation" /></td>
                <tr>
                <tr>
                    <td>Price</td>
                    <td><input type="number" step="0.01" name="price" /></td>
                </tr>
                <tr>
                    <td>Image</td>
                    <td><input type="text" name="url" /></td>
                <tr>
            </table>
            <select name="ingredients" multiple>
                <c:forEach var="ing" items="${ingredients}">
                    <option value="${ing.id}"><span>${ing.designation}</span></option>
                </c:forEach>
            </select>
            <br />
            <input type="submit" value="Add new product">
        </form>
        <a href="/webshop/admin/products"><button>Back to Product Overview</button></a>
    </body>
</html>